<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
%>

<jsp:include page="/admin/inc/incHead.jsp" flush="false"/>
    <script language="javascript">
        function classDel(classId) {
            if (confirm('您确定删除吗？')) {
                window.location.href = "<%=path %>/class/classDel.action?classId=" + classId;
            }
        }
    </script>
<table class="table table-bordered">
    <tr bgcolor="#E7E7E7">
        <td height="14" colspan="4">商品类别</td>
    </tr>
    <tr align="center" bgcolor="#FAFAF1" height="22">
        <td width="25%">ID</td>
        <td width="25%">分类名称</td>
        <td width="25%">分类描述</td>
        <td width="25%">操作</td>
    </tr>
    <s:iterator value="#request.classList" var="class">
        <tr align='center'>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#class.classId"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#class.className"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <s:property value="#class.classInfo" escapeHtml="false"/>
            </td>
            <td bgcolor="#FFFFFF" align="center">
                <a href="/class/classEditPage.action?classId=<s:property value="#class.classId"/>">修改</a>
                <a href="#" onclick="classDel(<s:property value="#class.classId"/>)" class="pn-loperator">删除</a>
            </td>
        </tr>
    </s:iterator>
</table>
<jsp:include page="/common/page.jsp" flush="true"/>
<jsp:include page="/admin/inc/incFoot.jsp" flush="false"/>
